home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-2 / Inter.Net 55-2.iso / Mandrake / mdkinst / usr / bin / perl-install / standalone / XFdrake < prev   
Encoding:
Text File  |  2000-01-12  |  1.6 KB  |  55 lines

  1. #!/usr/bin/perl
  2.  
  3. # XFdrake
  4. # Copyright (C) 1999 MandrakeSoft (pixel@linux-mandrake.com)
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. use lib qw(/usr/lib/libDrakX);
  21.  
  22. use interactive;
  23. use Xconfigurator;
  24. use Xconfig;
  25. use c;
  26.  
  27. local $_ = join '', @ARGV;
  28.  
  29. /-h/ and die "usage: XFdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
  30.  
  31. $::beginner = /-beginner/;
  32. $::expert = /-expert/;
  33. $::auto = /-auto/;
  34. $::noauto = /-noauto/;
  35. $::skiptest = /-skiptest/;
  36. $::testing = /-testing/;
  37. $::isStandalone = 1;
  38.  
  39. my $f = "/usr/X11R6/lib/X11/Cards";
  40. -e $f or system("urpmi --auto XFree86 XFree86-75dpi-fonts");
  41. -e $f or die "install XFree86 first!\n";
  42.  
  43. my $in = vnew interactive('su');
  44.  
  45. `pidof xfs` > 0 or system("/etc/rc.d/init.d/xfs start");
  46.  
  47. system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing
  48.  
  49. my $i = $0 =~ Xdrakres ? Xconfig::getinfoFromXF86Config() : {};
  50. Xconfig::getinfo($i);
  51.  
  52. Xconfigurator::main('', $i, $in, 0, -e "/etc/pcmcia", sub { system("urpmi --auto XFree86-$_[0]") });
  53.  
  54. $in->exit(0);
  55.